package com.fowo.api.model.supplier.order.product;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.excel.ImageConvert;
import com.fowo.api.sys.entity.SysFile;
import java.util.List;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 供应商订单子表 导入导出辅助模型 */
@Getter
@Setter
public class SupplierOrderProductExcelPo {

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属供应商订单")
  private String parentSupplierOrderSupplierOrder;

  @ExcelIgnore
  @ExcelProperty(value = "所属供应商订单")
  private Long parentSupplierOrder;

  @Size(max = 50, message = "所属供应商订单长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属供应商订单")
  private String supplierOrderId;

  @Size(max = 50, message = "SKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "SKU")
  private String sku;

  @Size(max = 50, message = "品名长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "品名")
  private String productName;

  @Size(max = 50, message = "标签长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "标签")
  private String tag;

  @Size(max = 50, message = "型号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "型号")
  private String model;

  @Size(max = 50, message = "采购数量长度不能超过20")
  @ExcelProperty(value = "采购数量")
  private Integer applicationNum;

  @ExcelProperty(value = "含税单价")
  private java.math.BigDecimal taxPrice;

  @ExcelProperty(value = "单价")
  private java.math.BigDecimal unitPrice;

  @ExcelProperty(value = "成本价格")
  private java.math.BigDecimal costPrice;

  @ExcelProperty(value = "主材料单价")
  private java.math.BigDecimal mainUnitPrice;

  @ExcelProperty(value = "主材料克重")
  private java.math.BigDecimal gramWeight;

  @ExcelProperty(value = "工费")
  private java.math.BigDecimal laborCosts;

  @ExcelProperty(value = "辅料")
  private java.math.BigDecimal accessoriesPrice;

  @ExcelProperty(value = "税率")
  private java.math.BigDecimal taxRate;

  @ExcelProperty(value = "税额")
  private java.math.BigDecimal taxAmount;

  @ExcelProperty(value = "金额")
  private java.math.BigDecimal totalPrice;

  @ExcelProperty(value = "价税合计")
  private java.math.BigDecimal amount;

  @Size(max = 50, message = "发货量长度不能超过20")
  @ExcelProperty(value = "发货量")
  private Integer quantityReceived;

  @ExcelProperty(value = "待发货量")
  private Integer quantityReceive;

  @ExcelProperty(value = "退货量")
  private Integer quantityReturn;

  @ExcelProperty(value = "结束差异量")
  private Integer endDifferenceQuantity;

  @DateTimeFormat("yyyy年MM月dd日HH:mm:ss")
  @ExcelProperty(value = "预计发货时间")
  private java.util.Date expectArriveTime;

  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "到货日期")
  private java.util.Date arrivalDate;

  @Size(max = 50, message = "采购单位长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购单位")
  private String applicationUnit;

  @Size(max = 50, message = "库存单位长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "库存单位")
  private String inventoryUnit;

  @ExcelProperty(value = "图片", converter = ImageConvert.class)
  private List<SysFile> picUrl;

  @Size(max = 50, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remarks;
}
